﻿using System.ComponentModel.DataAnnotations;

namespace TimeProject.WebSite.ViewModels
{
    public partial class ChangePasswordViewModel : ViewModelBase
    {
        /// <summary>
        /// The password.
        /// </summary>
        [Required(ErrorMessage = "The old password is required.")]
        [StringLength(100, ErrorMessage = "The old password must be at least {2} characters long.", MinimumLength = 6)]
        [DataType(DataType.Password)]
        [Display(Name = "Old password")]
        public string OldPassword { get; set; }

        /// <summary>
        /// The new password.
        /// </summary>
        [Required(ErrorMessage = "The new password is required.")]
        [StringLength(100, ErrorMessage = "The new password must be at least {2} characters long.", MinimumLength = 6)]
        [DataType(DataType.Password)]
        [Display(Name = "New password")]
        public string NewPassword { get; set; }

        [DataType(DataType.Password)]
        [Display(Name = "Confirm new password")]
        [Compare("NewPassword", ErrorMessage = "The new password and confirmation password do not match.")]
        public string ConfirmNewPassword { get; set; }
    }
}
